body {
background-color: #fefcf8;
color: #4b3b2f;
font-family: Arial, sans-serif;
}
h1 {
color: #6f4e37;
}
h2 {
color: #8b5e3c;
}
p {
font-size: 16px;
line-height: 1.6;
}
For this project, I used a small observational dataset I gathered from observing people purchasing coffee over the course of a day. Rather than tracking my own coffee habits, I observed other people — making note of the kind of coffee they bought, where they bought it, and the estimated price.
The data was collected on May 17, 2025, in various public spaces such
as cafés, university areas, and convenience stores.
Due to physical limitations — I was recovering from a back injury at the
time — I wasn’t able to move around or stay outside for long
periods.
As a result, the dataset is limited in size and may not capture every
detail accurately. However, it still reflects a slice of real-world
coffee-buying behaviours in everyday environments.
My goal was to discover patterns in:
The types of coffees people are most likely to purchase,
Where they prefer to purchase them from (i.e., chain cafes, university cafes, homemade), and
What these coffees cost.
In spite of the small dataset, I attempted to tease out insightful observations via data visualisation. This visual story shows how data — though imperfect or incomplete — can still provide interesting information when structured and analysed in a thoughtful way.
The first visualisation shows the average price of each coffee type recorded in the dataset.
There was quite a variation in price depending on the type of coffee. For example, specialty drinks like iced lattes or flat whites had higher average prices, while simpler options like long blacks or instant coffee were lower.
This could be a reflection of the cost of ingredients, the level of preparation involved, or the type of cafés that would probably sell those choices. Even in the limited dataset, the variety of prices illustrates how different tastes in coffee have different costs.
To add some more visual appeal to the visualisation, I also created
an artistic version with the {cuttingshapes} package:
Getting this visual effect was a trial-and-error process. One issue was attempting to learn that the initial story needed strong contrast between the background and the bars (e.g., black bars against a white background), or the shape could not be properly recognised and chopped by the image. While it was just an extra activity added by the lecturer, I took a lot of time getting it up and running and was able to learn a lot about layering and processing visuals in R. What this experience did teach me, not just technically, but also how much of an impact little design details can make or ruin a visualisation.
The second visualisation focuses on where people tended to buy their coffee.
We can see from this plot that cafés — more specifically university cafés and chain cafés — were the most common purchase places. Homemade coffee (instant or thermos coffee) were seen less frequently, as did individual local cafés.
This may be an indicator of the ease and convenience of university and chain cafés, especially for students and employees rushing from one class to another or with not much time to spare. On the other hand, people who brewed coffee at home likely already did so before they arrived at public places, thereby making their behavior less noticeable during the times I was watching.
The graph also shows that convenience stores were the source least utilized for coffee in this sample, possibly because these stores offer fewer options or lower quality coffee.
So the sample size is small, this visualisation helps us see some early trends in where people prefer to get their coffee — likely influenced by time, habit, and convenience.
The third visualization examines what time of day individuals were likely to buy coffee.
The line graph shows that most coffee purchases were made between 12:00 p.m. and 1:00 p.m., after which there was a drop-off. Few purchases were made in the morning, which was a little surprising given that morning is typically prime coffee time.
A possible explanation is that most of my observations were done around lunchtime, due to time constraints and limited mobility from my back injury. This might have biased the dataset towards midday activity and missed out morning coffee routines.
Despite the limited time frame, this visualisation still represents a real-life snapshot of when people around me were buying coffee. It shows how timing — both of people’s habits and of my observations — can affect the patterns we see in data.
If I had more time or could observe throughout the whole day, I would expect to see a peak in the morning hours as well.
This project used a small data set to look at trends in coffee consumption. From the visualizations, I concluded three main trends:
Some kinds of coffee, like iced coffee, cost more on average than more simple items.
Most coffees were purchased at university or chain cafés, rather than being homemade or at local cafés.
The greatest number of purchases fell during the lunch time period.
These trends demonstrate ways that coffee choices might be shaped by considerations like cost, convenience, and daily routines. Even with limited data, the visualisations were able to demonstrate how small behavioral routines can have a bigger story to tell.